'use strict';

function compute_average(collection) {
  function getsum(total,num){
    return total+num;
  }
  let result=collection.reduce(getsum)/collection.length;
  return result;
}

module.exports = compute_average;

